package com.smedi.ismedi.progress.core.domain.repository;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.smedi.ismedi.constructionproject.api.dto.response.ProjectBasicResponse;
import com.smedi.ismedi.progress.api.dto.response.ProgressReportMonthDetailAllResponse;
import com.smedi.ismedi.progress.api.dto.response.ProgressReportWeekDetailAllResponse;
import com.smedi.ismedi.progress.core.application.command.ProgressReportExportQuery;
import com.smedi.ismedi.progress.core.application.command.ProgressReportOneQuery;
import com.smedi.ismedi.progress.core.application.command.ProgressReportListQuery;
import com.smedi.ismedi.progress.core.application.command.ProgressWeekMonthReportCommand;
import com.smedi.ismedi.progress.core.domain.aggregatemodel.*;
import com.smedi.ismedi.progress.core.port.adapter.persistence.model.ProgressReportEntity;

import java.util.List;
import java.util.Map;

/**
 * @author Cookie
 * @date 2022/09/16
 */
public interface ProgressReportRepository {

    ProgressReport getProgressWeekReportOne(ProgressReportOneQuery progressReport);

    void updateProgressReportData(Progress versionManage);

    ProgressReport updateProgressReport(ProgressReport weekReport);

    ProjectBasicResponse getProject(Long projectId);

    void updateReportDetailToProject(ProgressReport weekReport);

    Page<ProgressReport> getProgressWeekReportList(ProgressReportListQuery progressReportListQueryList);

    Page<ProgressReport> getProgressMonthReportList(ProgressReportListQuery progressReportListQuery);

    WeekMonthReportEidt monthWeekReportEidtDetail(ProgressWeekMonthReportCommand progressWeekMonthReportCommand);

    ProgressReportMonthDetailAllResponse getProgressMonthReportDetail(ProgressReportExportQuery progressReportExportQuery);

    ProgressReportWeekDetailAllResponse getProgressWeekReportDetail(ProgressReportExportQuery progressReportExportQuery);

    WeekMonthReportEidt saveReportAndDetial(WeekMonthReportEidt weekMonthReportEidt);

    Integer findTimeCount(WeekMonthReportEidt weekMonthReportEidtQuery);

    WeekMonthReportEidt getWeekMonthReportOne(WeekMonthReportEidt weekMonthReportEidtNew);

    String monthWeekReportCreateSum(WeekMonthReportType weekMonthReportType);

    String monthReportCreate(MonthReportCreate monthReportCreate);

    Boolean weekReportCreate(String date);

    Integer findWeekReport(String firstDay, int weekType, Long id, Long projectId, int type);

    List<ProgressReportEntity> getAllProgressReport();

    Integer findMonthReport(int monthType, Long projectId, Long id, int weekMonthDraftStatus);

    Boolean monthReportCreateTask();

    List<Map<String, Object>> milestoneAndKeyLagging7(ProgressReport weekReport);

    List<ProgressReportMonthDetailAllResponse> getProgressMonthReportDetailBatch(ProgressReportExportQuery progressReportExportQuery);

    Integer findMonthNoReport(int monthType, Long projectId);

    Page<ProgressReport> getProgressWeekMonthReportListApp(ProgressReportListQuery progressReportListQuery);

    List<ProjectScheduleDetail> getProjectScheduleDetailTaskList(ProgressWeekMonthReportCommand progressWeekMonthReportCommand);

    /**
     * 根据项目ID获取该项目的施工项目经理职务ID
     * @param projectId
     * @return
     */
    List<Long> getConstructionMemberByProjectId(Long projectId);
}
